home *** CD-ROM | disk | FTP | other *** search
/ Aminet 52 / Aminet 52 (2002)(GTI - Schatztruhe)[!][Dec 2002].iso / Aminet / util / moni / Scout-src.lha / netinclude / rpcsvc / Makefile.org < prev    next >
Makefile  |  2002-09-16  |  2KB  |  81 lines

  1. #
  2. # @(#)Makefile    2.3 88/08/11 4.0 RPCSRC
  3. #
  4. #
  5. RPCCOM = rpcgen
  6. LIB = -lrpclib
  7.  
  8. DESTDIR=
  9. CFLAGS= -O
  10. LDFLAGS=
  11.  
  12. HDRS= klm_prot.h mount.h nfs_prot.h nlm_prot.h rex.h rquota.h rnusers.h\
  13.       rquota.h rstat.h sm_inter.h spray.h yppasswd.h yp.h
  14. XFILES= bootparam_prot.x klm_prot.x mount.x nfs_prot.x nlm_prot.x \
  15.       rex.x rnusers.x rquota.x rstat.x sm_inter.x spray.x yppasswd.x yp.x
  16. BIN= rstat
  17. SVCBIN= rstat_svc
  18. GEN= rstat_clnt.c rstat_svc.c rstat_xdr.c
  19.  
  20. all:    $(HDRS) $(BIN) $(SVCBIN)
  21.  
  22. install: $(HDRS) $(XFILES)
  23.     @echo "Creating RPC service headers directory"
  24.     -mkdir ${DESTDIR}/usr/include/rpcsvc && \
  25.         chown bin ${DESTDIR}/usr/include/rpcsvc && \
  26.         chmod 755 ${DESTDIR}/usr/include/rpcsvc
  27.     @echo "Installing RPC service header and definition files"
  28.     for i in $(HDRS) $(XFILES); do \
  29.         (install -c -m 644 $$i ${DESTDIR}/usr/include/rpcsvc) done
  30.     -mkdir ${DESTDIR}/etc && chown bin ${DESTDIR}/etc && \
  31.         chmod 755 ${DESTDIR}/etc
  32.     @echo "Installing ${SVCBIN} in ${DESTDIR}/etc"
  33.     @set -x;for i in ${SVCBIN}; do \
  34.         (install -c -s $$i ${DESTDIR}/etc/$$i); done
  35.     @echo "Installing ${BIN} in ${DESTDIR}/usr/bin"
  36.     @set -x;for i in ${BIN}; do \
  37.         (install -c -s $$i ${DESTDIR}/usr/bin/$$i); done
  38.  
  39. rstat_svc: rstat_proc.o rstat_svc.o rstat_xdr.o
  40.     $(CC) $(LDFLAGS) -o $@ rstat_proc.o rstat_svc.o rstat_xdr.o $(LIB)
  41.  
  42. rstat: rstat.o rstat_clnt.o rstat_xdr.o
  43.     $(CC) $(LDFLAGS) -o $@ rstat.o rstat_clnt.o rstat_xdr.o $(LIB)
  44.  
  45. rstat.c rstat_proc.c:    rstat.h
  46.  
  47. klm_prot.h:    klm_prot.x
  48.     $(RPCCOM) -h klm_prot.x -o $@
  49. mount.h:    mount.x
  50.     $(RPCCOM) -h mount.x -o $@
  51. nfs_prot.h:    nfs_prot.x
  52.     $(RPCCOM) -h nfs_prot.x -o $@
  53. nlm_prot.h:    nlm_prot.x
  54.     $(RPCCOM) -h nlm_prot.x -o $@
  55. rex.h:    rex.x
  56.     $(RPCCOM) -h rex.x -o $@
  57. rnusers.h:    rnusers.x
  58.     $(RPCCOM) -h rnusers.x -o $@
  59. rquota.h:    rquota.x
  60.     $(RPCCOM) -h rquota.x -o $@
  61. rstat.h:    rstat.x
  62.     $(RPCCOM) -h rstat.x -o $@
  63. sm_inter.h:    sm_inter.x
  64.     $(RPCCOM) -h sm_inter.x -o $@
  65. spray.h:    spray.x
  66.     $(RPCCOM) -h spray.x -o $@
  67. yp.h:    yp.x
  68.     $(RPCCOM) -h yp.x -o $@
  69. yppasswd.h:    yppasswd.x
  70.     $(RPCCOM) -h yppasswd.x -o $@
  71.  
  72. rstat_clnt.c:    rstat.x
  73.     $(RPCCOM) -l rstat.x -o $@
  74. rstat_svc.c:    rstat.x
  75.     $(RPCCOM) -s udp rstat.x -o $@
  76. rstat_xdr.c:    rstat.x
  77.     $(RPCCOM) -c rstat.x -o $@
  78.  
  79. clean cleanup:
  80.     rm -f *.o $(GEN) $(BIN) $(SVCBIN)
  81.